/**
 * 
 */
package com.my.dao;

import java.math.BigInteger;
import java.util.List;

import com.my.bean.Role;

/**
 * @author tanglin
 * 
 */
public interface RoleDAO {
	boolean isExist(String roleName);

	boolean addRole(Role role) throws Exception;

	boolean editRole(Role role) throws Exception;

	Role getRoleById(Class<Role> c, Integer id) throws Exception;

	boolean removeRole(Role role) throws Exception;

	List<Role> getRoleList() throws Exception;

	BigInteger getTotalRoleRecords() throws Exception;

	List<Role> getAllRoleByPage(int pageindex, int pagesize) throws Exception;

	BigInteger searchTotalRoleRecords(Role role) throws Exception;

	List<Role> searchAllRoleByPage(int pageindex, int pagesize, Role role)
			throws Exception;

}
